Skip to content

Conversation

@AnupAutoGit
Copy link

This PR includes local fixes for locate_agent and research_agent, along with updated configurations and utility scripts.

Made with Cursor

Copy link
Contributor

@scrrlt scrrlt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

submit pr to dev and not main please

docker-compose.yml: resource limits are hardcoded (mem_limit: 12g). assumes deployment hardware has this capacity. use environment variables or remove. verify curl exists in the base image for healthcheck; otherwise use python-native check.

scripts: kill_stuck_process.sh and quick_fix_embedding.sh are band aid fixes; fix the deadlock in the asyncio loop or pipe buffer.

web/activetaskdetail.tsx: defines p component inline within reactmarkdown. this forces remounts on every render. move definition outside main component or use usememo.

src/agents/locate_agent.py: logic uses raw json.loads(response). this will crash on markdown fences. require a clean_json_string() utility wrapper to strip delimiters before parsing

src/knowledge/add_documents.py: _process_lightrag instantiates embedding_client inside the loop. inject client via init or ensure factory is a strict singleton.

typing: code lacks explicit type definitions. test() function missing -> none. await client.embed(...) returns unknown type; assert shape before accessing index 0.

error handling: except exception as e is too broad. masks specific failures. catch specific exceptions.

logging: remove print() statements. use structured logger. avoid f-strings in log calls

documentation: missing docstrings. adhere to google docstring style and verify coverage

testing: dont use shell scripts for verification. move logic to src/scripts/ and implement pytest integration cases.

magic strings: hardcoded strings found. extract to constants.

remove all ai documentation, session logs, etc (optimize_performance.md, troubleshoot_embedding.md, content_files.txt, raw_files.txt). update readme.md if process documentation is required.

good ++
src/knowledge/add_documents.py: the np.array(embeddings) cast is a valid and necessary fix for lightrag compatibility. verify this doesn't regress with the new cast.

web/: note_generated event handling is a solid addition.

src/agents/locate_agent.py: general json parsing logic flow is correct (once sanitized).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants